package modelo;
// default package
// Generated 25/10/2014 15:59:58 by Hibernate Tools 3.4.0.CR1

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Interesado generated by hbm2java
 */
@Entity
@Table(name = "interesado", catalog = "eventos_compartidos")
public class Interesado implements java.io.Serializable {

	private Integer idInteresado;
	private Persona persona;
	private Set<Cita> citas = new HashSet<Cita>(0);

	public Interesado() {
	}

	public Interesado(Persona persona, Set<Cita> citas) {
		this.persona = persona;
		this.citas = citas;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "idInteresado", unique = true, nullable = false)
	public Integer getIdInteresado() {
		return this.idInteresado;
	}

	public void setIdInteresado(Integer idInteresado) {
		this.idInteresado = idInteresado;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "idPersona")
	public Persona getPersona() {
		return this.persona;
	}

	public void setPersona(Persona persona) {
		this.persona = persona;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "interesado")
	public Set<Cita> getCitas() {
		return this.citas;
	}

	public void setCitas(Set<Cita> citas) {
		this.citas = citas;
	}

}
